package com.ctd.springframework.util;

import java.util.Collection;
import java.util.Objects;

/**
 * CollectionUtils
 *
 * @author chentudong
 * @time 2019/3/24 17:16
 */
public class CollectionUtils {
    /**
     * assert collection is null OR size = 0
     *
     * @param collection collection
     * @return boolean
     */
    public static boolean isEmpty(Collection<?> collection) {
        return (Objects.isNull(collection) || collection.isEmpty());
    }
}
